/**
 *
 * Panel base de la aplicacion
 *
 * @author Javier Caride Ulloa
 * @copyright (c) 2010, by Javier Caride Ulloa
 * @date April 26th, 2010
 * @version $Id:$
 *
 * @license Book.ui.js is licensed under the terms of the Open Source GPL 3.0 license.
 *
 * License details: http://www.gnu.org/licenses/gpl.html
 */

BookUi = Ext.extend(Ext.Panel, {
    width: 1000,
    height: 600,
    layout: 'border',
	border: false,
    initComponent: function() {
	
		this.bookGrid = new BookGridUi();
		this.filterForm = new FilterFormUi({
			filterTarget: this.bookGrid
		});

		this.addForm = new AddFormUi();
	
        this.items = [
			{
				xtype: 'panel',
				title: 'Movimientos',
                region: 'center',
                layout: 'fit',
				width: 690,
				height: 460,
				items: [
					this.bookGrid
				]
			},
			{
				xtype: 'panel',
                region: 'north',
                layout: 'fit',
				width: 990,
				height: 120,
				items: [
					this.filterForm
				]
			},
			{
				xtype: 'panel',
				title: 'Alta/Edición',
                region: 'west',
                layout: 'fit',
				collapsible: true,
				width: 300,
				height: 460,
				items: [
					this.addForm
				]
			}			
        ];
        BookUi.superclass.initComponent.call(this);
    }
});
